from django.shortcuts import render
# Create your views here.
from django.http import JsonResponse
from django.views import View
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.views import APIView

def auth(request):
    if request.method == 'POST':
        print(request.POST)
        return JsonResponse({'status': False, 'message': "success"})
    elif request.method == 'GET':
        print(request.GET)
        return JsonResponse({'status': True, 'message': "success"})
    return JsonResponse({'status':'ok','message':"success"})
@api_view(['POST'])
def login_apivie(request):
    return Response({'status':True,'message':"success"})
class UserView(View):
    def get(self,request, pk):
        return JsonResponse({'status':True,'message':"success"})
    def post(self,request):
        return JsonResponse({'status':True,'message':"post"})
    def put(self,request):
        return JsonResponse({'status':True,'message':"success"})
    def delete(self,request):
        return JsonResponse({'status':True,'message':"success"})

class LoginView(APIView):

    def get(self,request):
        self.args
        self.kwargs
        return Response({'status':True,'message':"success"})


class InfoView(APIView):
    def get(self,request,dt):
        return Response({'status':True,'message':"success"})
    def post(self,request,*args,**kwargs):
        return Response({'status':True,'message':"success"})
    pass



class home(APIView):
    def get(self,request):
        print(request.user)
        print(request.auth)
        return Response({'status':True,'message':"success"})
    def post(self,request,*args,**kwargs):
        return Response({'status':True,'message':"success"})
    pass
